import logging
import yagmail

def log_sent():
    logging.basicConfig(level=logging.DEBUG,format='%(message)s',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])
def send_mail(filepath):
    mail=yagmail.SMTP(user='3273801850@qq.com',password='imdfrfvjlembcjai',host='smtp.qq.com')
    mail.send(to='3273801850@qq.com',subject='111',contents='11111',attachments=filepath)